import Ajax from "../../../../../utils/ajax"
const app = getApp();
Component({
  options: {
    addGlobalClass: true
  }, 
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    list:[]
  },
  attached(){
    var th= this;
    Ajax.get(Ajax.api.listByAuth,{
       
    }).then((res)=>{
      console.log(res);
      th.setData({ list:res.rows  })
    }); 
  },
  /**
   * 组件的方法列表
   */
  methods: {
    async onChoose(e){
      var id = e.currentTarget.dataset.id
      wx.navigateTo({
        url:'/views/publish/index/index?id='+ id
      })
    }
  }
})
